
<div class="content-section implementation GridDemo clearfixes borrowapproved">
  <form [formGroup]="borrowapprovedForm" >
    <p-panel>
      <p-header>
        <div class="ui-helper-clearfix">
          <span class="ui-panel-title" style="font-size:16px;display:inline-block;margin-top:2px"></span>
          <button  pButton type="button"  label="返回" (click)="approvedgoBack()" [ngStyle]="{'width':'75px'}" ></button>
          <button pButton [ngStyle]="{'float':'right'}"   *ngFor="let optbutton of optButtons"  label="{{optbutton.label}}" [disabled]="!borrowapprovedForm.valid" (click)="approvedOption(optbutton.status)"></button>

        </div>
      </p-header>
      <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label >借用单号:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="sid"  name="sid"  type="text" pInputText   value="{{currentMaterial?.sid}}" readonly>
          </div>
          <div class="ui-grid-col-1 text-right">
            <label >申请类型:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="types" name="types"  type="text" pInputText    value="{{currentMaterial?.type}}" readonly>

          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label >借用人:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="creator" name="creator"  type="text" pInputText    value="{{currentMaterial?.creator}}" readonly>

          </div>
          <div class="ui-grid-col-1 text-right">
            <label >部门名称:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="org"  name="org"  type="text" pInputText    value="{{currentMaterial?.org}}" readonly>

          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label >借用时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="create_time" name="create_time"  type="text" pInputText    value="{{currentMaterial?.create_time}}" readonly>

          </div>
          <div class="ui-grid-col-1 text-right">
            <label >归还时间:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="return_time"  name="return_time"  type="text" pInputText    value="{{currentMaterial?.return_time}}" readonly>

          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label >借用原因:</label>
          </div>
          <div class="ui-grid-col-5">
            <input formControlName="remarks" name="remarks"  type="text" pInputText    value="{{currentMaterial?.remarks}}" readonly>

          </div>
        </div>
        <div class="ui-grid-row margin-bottom-1vw">
          <div class="ui-grid-col-1 text-right">
            <label ><span>*</span>审批意见:</label>
          </div>
          <div class="ui-grid-col-11">
            <textarea formControlName="approve_remarks" pInputTextarea type="text" name="approve_remarks"  [(ngModel)]="approvedModel['approve_remarks']"  ></textarea>
            <div class="ui-message ui-messages-error ui-corner-all"  *ngIf="!borrowapprovedForm.controls['approve_remarks'].valid&&(!borrowapprovedForm.controls['approve_remarks'].untouched)" >
              <i class="fa fa-close"></i>
              审批意见必填
            </div>
          </div>
        </div>
      </div>
    </p-panel>
  </form>
  <div class="ui-g">
    <div class="mysearch">
      借用列表
    </div>
  </div>

  <!--<label></label>-->

  <p-dataTable emptyMessage="没有数据" [value]="inventories" [lazy]="true" [rows]="10" [paginator]="true" [rowsPerPageOptions]="[5,10,20]"
               [totalRecords]="totalRecords" (onLazyLoad)="loadCarsLazy($event)" [stacked]="stacked" [responsive]="true" >
    <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
  </p-dataTable>
</div>




